from PyQt5.QtWidgets import QGraphicsView, QGraphicsScene

class Topo(QGraphicsView):
    def __init__(self):
        super().__init__()

        # 创建场景
        self.scene = QGraphicsScene(self)
        self.setScene(self.scene)

